home *** CD-ROM | disk | FTP | other *** search
- /*******************************************************************************
- * Line plane sweep algorithm implementation - header file. *
- * *
- * Written by: Gershon Elber Ver 1.0, June 1993 *
- *******************************************************************************/
-
- #ifndef LN_SWEEP_H
- #define LN_SWEEP_H
-
- #include "irit_sm.h"
-
- typedef RealType LsPoint[3]; /* The Z component is pretty much ignored. */
-
- typedef struct LsLineSegStruct {
- struct LsLineSegStruct *Pnext;
- LsPoint Pts[2];
- long Id; /* Lines with unique ID never intersect. */
- VoidPtr PAux; /* Auxiliary backpointer - not used by ln_sweep. */
- struct LsIntersectStruct *Inters;
- LsPoint _MinVals; /* Bounding box on the line */
- LsPoint _MaxVals;
- LsPoint _Vec; /* A vector from first point to second. */
- RealType _ABC[3]; /* Line equation as Ax + By + C. */
- } LsLineSegStruct;
-
- typedef struct LsIntersectStruct {
- struct LsIntersectStruct *Pnext;
- RealType t;
- RealType OtherT;
- struct LsLineSegStruct *OtherSeg;
- long Id; /* Unique ID of intersection. */
- } LsIntersectStruct;
-
- void LineSweep(LsLineSegStruct **Lines);
-
- #endif /* LN_SWEEP_H */
-